<template>
  <div class="volunteer-analyze-container">
    <div class="page-header">
      <h1>{{ $t('volunteerAnalysisTitle') }}</h1>
    </div>
    <div class="dashboard-wrapper">
      <!-- 上半部分 -->
      <div class="upper-section">
        <!-- 左侧滚动列表 -->
        <div class="left-panel">
          <volunteer-scroll />
        </div>

        <!-- 中间标题 + 饼图 -->
        <div class="center-panel">
          <div class="chart-row">
            <chart-rating />
            <active-map />
          </div>
        </div>

        <!-- 右侧预留区域 -->
        <div class="right-reserve">
          <VolunteersRight></VolunteersRight>
        </div>
      </div>

      <!-- 下半部分占位 -->
      <div class="lower-section">
        <volunteer-botton />
      </div>
    </div>
  </div>
</template>

<script setup>
import VolunteerScroll from '../../components/volunteerData/volunteerScroll.vue'
import ChartRating from '../../components/volunteerData/chartRating.vue'
import ActiveMap from '../../components/volunteerData/activeMap.vue'
import VolunteerBotton from '../../components/volunteerData/volunteerBotton.vue'
import VolunteersRight from "../../components/volunteerData/volunteersRight.vue";
</script>

<style scoped lang="less">
.volunteer-analyze-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  padding: 20px;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 20px;
  text-align: center;
}

/* 上半部分布局 */
.upper-section {
  display: flex;
  height: 420px;
  gap: 20px;
}

/* 左右面板等宽 */
.left-panel,
.right-reserve {
  width: 420px;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  overflow: hidden;
}

/* 中间区域：标题 + 饼图横向排列 */
.center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

/* 饼图区域左右排列 */
.chart-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex: 1;
  overflow: hidden;
}

.chart-row > * {
  flex: 1;
  height: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 下半部分占位 */
.lower-section {
  flex: 1;
  margin-top: 30px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 18px;
  font-style: italic;
}
</style>
